home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / video / Chicago TI Fair 2014 Videos / Chicago TI Faire Disk 2014 / RENAMING_FILES_IN_LINUX.TXT < prev   
Text File  |  2014-11-26  |  2KB  |  48 lines

  1. How to batch file rename TI .dsk files: "filename.dsk"
  2.  that were converted to HxC .hfe files
  3.      and now have the following format: "filename"_dsk.hfe
  4.                      want to change to: "filename".hfe
  5.  so that the total filename is shorter and easier to read on the HxC display,
  6.  which scrolls and is illegible with names over 15 total characters.  They will
  7.  run otherwise, just hard to read!
  8.  
  9. UNIX COMMAND:
  10. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
  11.  
  12. EXPLANATION:
  13. rename = rename files
  14. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
  15.        -v = verbose display the files worked on
  16.        
  17. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe       
  18.           's/ = 'switch/old/new/' command beginning
  19.           
  20. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe          
  21.              \ = treat following underline character as what it is, not a command shortcut
  22.              
  23. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe             
  24.               _dsk = unwanted characters in filename
  25.               
  26. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe              
  27.                   \ = treat following dot character as what it is, not a command shortcut
  28.                   
  29. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe                  
  30.                    .hfe current extension
  31.                    
  32. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe                   
  33.                        / = end of old command 
  34.                        
  35. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe                           
  36.                         \ = treat following dot character as what it is, not a command shortcut
  37.                         
  38. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe                         
  39.                          .hfe = new extension
  40.                          
  41. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe                         
  42.                              /' = switch /old/new/ command closing characters
  43.                              
  44. rename -v 's/\_dsk\.hfe/\.hfe/' *hfe                             
  45.                          (space)*hfe = only work on all files with this extension 
  46.  
  47. Batch files like this saved me a TON of typing when renaming the files on this disk!
  48.